<?php session_start() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Adopt a Cat from the Kalamazoo Animal Rescue</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<? include("includes/head.inc");  ?>

<style type="text/css">
<!--
.style1 {
	font-size: 18px;
	font-weight: bold;
	color: #000000;
}
-->
</style>
</head>

<body>

<!--initial body width and height set up  -->

<div id="bodywidth">

<? include("includes/header.inc");  ?>
<? include("includes/leftmenu.inc");  ?>

<!--wide2column enter here --><div id="wide2column">
<BR><BR><BR>
<CENTER><H2>Adoptable Cats</H2></CENTER>
<BR>

<b>Please fill out our <A HREF="forms/catadopt.php">online application form</A> if you are interested in adopting a cat or kitten. <b><font color = #ff00ff>Please be patient with us. We are all volunteers who donate our time.</b></font><BR><BR>

For information on declawing, please read <A HREF="declaw.htm">KAR's declaw statement.</A> </b><br /> <!-- Would you like an email notice the day a new pet is added to the web site?  Then <a href="karnews.htm">subscribe to kar-Friends</a>. Please understand that we are not able to keep a waiting list. -->

<HR WIDTH="95%" ALIGN=CENTER><BR>
<p style="margin-left:20px;font-size:124%;font-weight:bold;">
Select the picture for a larger image and detailed description.
</p>
<BR>
<?php

include("./includes/db.php");
include("./includes/count.php");

// Connect to the database server
dbConnect('kar_web1');   	// Use function in db.php to connect

$numresults = @mysql_query("SELECT * FROM cats  WHERE 

						pet_status='v'");

//						TO_DAYS(NOW()) - TO_DAYS(pet_DOB) > 210");

if (!$numresults) {	

  echo("<p>Error performing query in Display Pets page: " . mysql_error() . "</p>");

  exit();

}


$num_to_display=20;  			//  how many animals we want displayed per page
$num_columns=5;				// how many columns we want those split between

$num_pets=mysql_num_rows($numresults); // how many total animals are actually available

if (empty($starting_num)){	// if this is our first page, then start at 0

	$starting_num=0;

} //  end if

$result = @mysql_query("SELECT * FROM cats WHERE pet_status='v' 
				   AND TO_DAYS(NOW()) - TO_DAYS(pet_DOB) > 210
				   LIMIT $starting_num,$num_to_display");

$count =mysql_num_rows($result);  // how many we have for this page
$pet_type = 'cats';
displayPageLinks($num_pets, $num_to_display, $starting_num, cats, 0);
//printf('Last MySQL Error was: (%s) - "%s"',mysql_errno(),mysql_error()); //kf error check
//   echo("<CENTER><TABLE cellpadding=\"10\">");

for ($i = 1; $i <= $count; $i++ ) {    	// loop for number of animals in this set

	$pet_record = mysql_fetch_array($result);
	$temp_id = $pet_record["tagNum"];
	$name = $pet_record["pet_name"];
	$special = $pet_record["spec_need"];
	$declawed = $pet_record["declawed"];
	$noPhotos = $pet_record["noPhotos"];
	//  Query Pet Photos separately in case there is not a record of photos for this pet
	$pics = @mysql_query("SELECT thumb, main, photo2, photo3 FROM cats WHERE tagNum ='$temp_id'");
	$pet_pics = mysql_fetch_array($pics);

	if ($noPhotos) {

		$thumb = 'noPhotos.gif';	// this file is in both the dog and cat thumbnail folders
		} else {
		$thumb = $pet_pics["thumb"];
		}

		$path = "http://02d2e0a.netsolhost.com/images/cats/thmbnail/";
		$type = "cat";

//	if ( ($i%$num_columns) == 1):		// if it's the first slot in the row, start the row

		echo ("<div class =\"float\">");   // no matter what start with this

// display pet thumbnail image and name

	echo("<a href='pets2.php?displaypet=$temp_id'><img SRC=\"". $path . $thumb . "\" align=\"$align\"  alt=\"$name\" width=\"75\" height=\"75\"></a>" );

//	echo("<BR clear=all>");

 	echo("<BR><p>");

	if ($declawed=='1'):		// declawed

		echo("<img SRC=\"http://02d2e0a.netsolhost.com/images/declawed.gif\"  HSPACE=0 ALIGN=\"TOP\" WIDTH=\"19\" HEIGHT=\"19\" ALT=\"Declawed\">");

	endif;

	
	echo($name . "</p></div>");

	if ( ($i%$num_columns) == 0):	// if it's the last slot in the row, end the row

		echo("<div class=\"clearit\"></div>");

	endif;

}  // end for 

	echo("<div class=\"clearit\"></div>");

displayPageLinks($num_pets, $num_to_display, $starting_num, $pet_type);

?>

<BR>

<!-- <img SRC="http://02d2e0a.netsolhost.com/images/sneed3.gif"  HSPACE=0 ALIGN="TOP" WIDTH="17" HEIGHT="17" ALT="Special Needs"> -- Special Needs

<BR> -->

<img SRC="http://02d2e0a.netsolhost.com/images/declawed.gif" HSPACE=0 ALIGN="TOP" WIDTH="19" HEIGHT="19" ALT="Declawed"> -- Declawed

<BR>

<CENTER>
  <p>Don't forget to check out the <a href="sccCats.htm">SENIOR</a> and  <a href="kittens.php">KITTEN</a> pages too!</p>
  <p>&nbsp;</p>
  <p><span class="style1">KAR may have more cats than are shown here.&nbsp;&nbsp;</span></p>
  <p><span class="style1">Fill   out the <a href="forms/catadopt.php">online application form</a> to be contacted   about a possible purrrfect match for you.</span><BR>
  </p>
</CENTER>
<BR>

<!-- <CENTER>
<HR>
<TABLE WIDTH="100%"> 
<TR><TD>
<FONT SIZE="+1"><B>There may be more cats & kittens in the Rescue than are listed here.&nbsp;&nbsp;Fill out the <A HREF="http://www.kalamazooanimalrescue.org/forms/catadopt.htm">online application form</A> to be contacted about a possible perfect match for you.</B></FONT>
</TD>
<TD>

Visit our <A HREF="http://02d2e0a.netsolhost.com/figures.php#Adopteds">"successes"</A> page to see who has found great new homes.</TR>

</TR>
</TABLE>
</CENTER> -->
</div>

<? include("./includes/footer.inc");  ?>

<!--tag below ends bodywidth div -->

</div>
</body>
</html>

